Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug fix] box points ordering #1205

Merged
merged 6 commits into from
Oct 12, 2022
Merged

[Bug fix] box points ordering #1205

merged 6 commits into from
Oct 12, 2022

Conversation

yjmm10
Copy link
Contributor

@yjmm10 yjmm10 commented Jul 26, 2022

This changes optimize sort_points function, mainly using the Cartesian coordinate system to convert point coordinates to a cartesian coordinate system, and then sort the polar coordinate points

The change also ensures the original command-line usage remains the same.

@CLAassistant
Copy link

CLAassistant commented Jul 26, 2022

CLA assistant check
All committers have signed the CLA.

@yjmm10 yjmm10 changed the title fix sort_points [Bug fix] box points ordering Jul 26, 2022
@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Base: 83.58% // Head: 83.53% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (f74b898) compared to base (a71889a).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head f74b898 differs from pull request most recent head b532671. Consider uploading reports for the commit b532671 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1205      +/-   ##
==========================================
- Coverage   83.58%   83.53%   -0.06%     
==========================================
  Files         170      170              
  Lines       11377    11365      -12     
  Branches     1696     1694       -2     
==========================================
- Hits         9510     9494      -16     
- Misses       1489     1492       +3     
- Partials      378      379       +1     
Flag Coverage Δ
unittests 83.53% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmocr/utils/box_util.py 88.46% <100.00%> (-1.54%) ⬇️
mmocr/models/textrecog/convertors/seg.py 89.04% <0.00%> (-2.74%) ⬇️
mmocr/datasets/pipelines/transforms.py 81.14% <0.00%> (-0.32%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@xinke-wang
Copy link
Collaborator

Hi, thank you for your contribution. We will review this code as soon as possible. At the same time, could you please sign the CLA shown on this page? So we can accept your contribution once it has been fully reviewed. Besides, since your PR hasn't passed our linting test, please follow the instruction to install pre-commit, which will automatically format your code to meet our code style requirement.

@yjmm10
Copy link
Contributor Author

yjmm10 commented Jul 27, 2022

  1. I have been signed the CLA
  2. I install pre-commit, and run pre-commit run --all-files, all pass. But when i run pytest tests, appear 66 errors, I doubt this result, maybe i didn't install the requirements of mmocr .

If you have some advice, i will correct it right now.

@xinke-wang xinke-wang closed this Jul 27, 2022
@xinke-wang xinke-wang reopened this Jul 27, 2022
@xinke-wang
Copy link
Collaborator

  1. Hi, thank you for your cooperation.
  2. The test failed due to a bug caused by mmcv version issue, we are going to fix this soon.
  3. The last thing we need to do before merging this PR is to refine the unit test for sort_points; currently, the test case is quite simple, which is also one of the main reasons that we did not notice the bug in the old version sort_points. Could you help us to add some more complicated test cases here, and let's see if the new version can pass all of those test cases?

tests/test_utils/test_box.py Outdated Show resolved Hide resolved
@gaotongxiao gaotongxiao merged commit 8905dae into open-mmlab:main Oct 12, 2022
gaotongxiao pushed a commit to gaotongxiao/mmocr that referenced this pull request Mar 9, 2023
* fix sort_points

* remove functools

* add test cases

* add descriptions for coordinates

* del

Co-authored-by: xinyu <wangxinyu2017@gmail.com>
gaotongxiao added a commit that referenced this pull request Mar 10, 2023
* [Bug fix] box points ordering  (#1205)

* fix sort_points

* remove functools

* add test cases

* add descriptions for coordinates

* del

Co-authored-by: xinyu <wangxinyu2017@gmail.com>

* fix

---------

Co-authored-by: liferecords <yjmm10@yeah.net>
Co-authored-by: xinyu <wangxinyu2017@gmail.com>
@yaqi0510
Copy link

Dear yjmm10,

First of all, we want to express our gratitude for your significant PR in the MMOCR project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

If you are Chinese or have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. We look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

Thank you again for your contribution❤

Best regards!@yjmm10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants